//
//  GetHeight.m
//  Slice
//
//  Created by lanou on 16/6/21.
//  Copyright © 2016年 wangjinchao. All rights reserved.
//

#import "GetHeight.h"

@implementation GetHeight

+(CGFloat)getHeighWithstring:(NSString *)string width:(CGFloat)width{
    
    NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys:[UIFont systemFontOfSize:17], NSFontAttributeName, nil];
    
    CGRect rect = [string boundingRectWithSize:(CGSizeMake(width, 1000)) options:NSStringDrawingUsesLineFragmentOrigin attributes:dictionary context:nil];
    return rect.size.height;
}



@end
